home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbfloat / float.frm < prev    next >
Text File  |  1995-09-06  |  1KB  |  56 lines

  1. VERSION 2.00
  2. Begin Form Float 
  3.    BackColor       =   &H00FFFF00&
  4.    Caption         =   "Float"
  5.    ClientHeight    =   1410
  6.    ClientLeft      =   4275
  7.    ClientTop       =   2460
  8.    ClientWidth     =   2310
  9.    Height          =   1815
  10.    Left            =   4215
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   1410
  13.    ScaleWidth      =   2310
  14.    Top             =   2115
  15.    Width           =   2430
  16.    Begin CommandButton Command1 
  17.       Caption         =   "Close"
  18.       Height          =   375
  19.       Left            =   360
  20.       TabIndex        =   0
  21.       Top             =   270
  22.       Width           =   1635
  23.    End
  24. End
  25.  
  26.  
  27.  
  28. Sub Command1_Click ()
  29.  
  30.   Unload float
  31.  
  32. End Sub
  33.  
  34. Sub Form_Load ()
  35.  
  36.   Dim OriginalParenthWnd As Integer
  37.   FloatUnloaded = True
  38.  
  39.  
  40. '.............. Set parent for the Float to display on top:
  41.   OriginalParenthWnd = SetWindowWord(Me.hWnd, GWW_HWNDPARENT, parent.hWnd)
  42.  
  43.  
  44. End Sub
  45.  
  46. Sub Form_Unload (Cancel As Integer)
  47.  
  48.   Dim ret As Integer
  49.  
  50. '...................... Return the original parent handle:
  51.     ret = SetWindowWord(Me.hWnd, GWW_HWNDPARENT, OriginalParenthWnd)
  52.   FloatUnloaded = False
  53.  
  54. End Sub
  55.  
  56.